Many computing systems include one or more low power saving modes. These computing systems can enter a low power mode, such as a Suspend-to-RAM (STR) mode for Linux-based computing systems or a Suspend-to-Disk (STD) mode, by storing program data and a processor state before allowing most of components in the computing system to be turned off. The program data can include a system configuration, any open applications, any active files, or the like, which can be stored to a main memory, for example, a random-access memory (RAM). The processor state can include values of registers and internal states of a processor in the computing system, which can be stored to a non-volatile memory. In the low power mode, the computing system provides enough power to the RAM to retain stored data and provides power to those components in the computing system capable of responding to an event prompting the computing system to wake-up from the low power mode.
For the computing system to wake-up from the low power mode, the processor typically executes BIOS (Basic Input/Output System) firmware, for example, implementing a System Management Mode (SMM), and then implements a boot loader and possibly associated following software to load an operating system. The processor can utilize the operating system and a configurable memory mapping retained in a memory management unit (MMU) to retrieve the values of registers and internal states of the processor and wake-up from the low power mode. Since the operating system understands the virtual addresses for the program data, the computing system, after the restart, can continue any programs where they were interrupted when entering into the low power mode.
There have been prior attempts to fully shutdown all components in the computing system except for the RAM during a Suspend-to-RAM operation and still be able to restart with programs leaving off where they were prior to entering the low power mode. Unfortunately, when a low power mode shuts down the memory management unit, the particular configuration of the memory mapping utilized to store both the program data and the processor state also has to be stored. During wake-up from the low power mode, a the boot loader utilizes new memory mapping from the memory management unit to perform its start-up operations, but when the prior configuration of the memory mapping in the memory management unit gets restored it overwrites the memory mapping utilized by the boot loader, which scrambles the memory mapping for the computing system.